home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00C0C0C0&
- Caption = "Form1"
- ClientHeight = 6180
- ClientLeft = 1110
- ClientTop = 1485
- ClientWidth = 5040
- Height = 6585
- Left = 1050
- LinkTopic = "Form1"
- ScaleHeight = 6180
- ScaleWidth = 5040
- Top = 1140
- Width = 5160
- Begin PictureBox List
- Height = 3075
- Left = 330
- ScaleHeight = 203
- ScaleMode = 3 'Pixel
- ScaleWidth = 223
- TabIndex = 4
- Top = 2370
- Width = 3375
- End
- Begin PictureBox loader
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Height = 480
- Left = 240
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 3
- Top = 990
- Visible = 0 'False
- Width = 480
- End
- Begin PictureBox defaulticon
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 480
- Left = 240
- Picture = FORM1.FRX:0000
- ScaleHeight = 32
- ScaleMode = 3 'Pixel
- ScaleWidth = 32
- TabIndex = 2
- Top = 1530
- Visible = 0 'False
- Width = 480
- End
- Begin PictureBox pics
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- Height = 480
- Left = 0
- Picture = FORM1.FRX:0302
- ScaleHeight = 32
- ScaleMode = 3 'Pixel
- ScaleWidth = 160
- TabIndex = 1
- Top = 0
- Visible = 0 'False
- Width = 2400
- End
- Begin VScrollBar vs
- Height = 2772
- LargeChange = 2
- Left = 2995
- Max = 2
- TabIndex = 0
- Top = 0
- Width = 264
- End
- Option Explicit
- Dim loading%
- 'structure holding the data for
- 'for this window's listbox
- Dim ld As LISTDATA
- 'this array holds the items in the list
- Dim items() As ITEMDATA
- Sub Form_Load ()
- Dim i%, x%
- ReDim items(0 To 40)
- For i = 0 To 40
- items(i).text = "Item " & Format$(i)
- x = i Mod 5
- items(i).pic = x
- 'Debug.Print x
- 'Debug.Print items(i).text
- End Sub
- Sub Form_Resize ()
- 'do whatever this instance requires
- List.Move 120, 120, scalewidth - vs.Width - 240, scaleheight - 240
- vs.Move List.Width + 120 - screen.TwipsPerPixelX, 120, vs.Width, List.Height
- 'call the module
- ResizeList Me, ld, List
- End Sub
- Sub Init ()
- nl$ = Chr$(13) + Chr$(10)
- 'fill in the structure for this instance
- 'size of an item
- ld.cellheight = 32
- ld.cellwidth = List.Width
- 'size of the bitmap
- ld.picx = 0: ld.picy = 0
- ld.picwidth = 32
- ld.picheight = 32
- 'location of text with the cell
- ld.textrect.left = 40
- ld.textrect.top = 8
- 'number of items
- ld.itemcount = 40
- InitializeList ld, List
- End Sub
- Sub List_MouseDown (Button As Integer, Shift As Integer, x As Single, Y As Single)
- ItemClick Me, ld, items(), x, Y, List
- End Sub
- Sub List_Paint ()
- If Not loading% Then PaintList ld, items(), pics, List
- End Sub
- Sub vs_Change ()
- Dim n%
- n = (vs.Value)
- 'Debug.Print "toprow=" & n
- 'toprow range: 0=1st row,1=2nd, etc
- ld.toprow = n
- List_Paint
- End Sub
-